Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(DataTable): fix padding issue when only some headers are sortable #7888

Merged
merged 3 commits into from
Feb 26, 2021

Conversation

tw15egan
Copy link
Member

@tw15egan tw15egan commented Feb 24, 2021

Ref #7791
Ref #7726 (comment)

Changelog

Added

  • Specific override for when isSortable is set on DataTable but some specific Headers are not sortable

Changed

  • Moved previous sort styles from core to sort scss file

Testing / Reviewing

You can test this by changing the header map inside TableHead --> TableRow in the DataTable-sorting.story to the code below. Also, try removing isSortable from DataTable to test different variations.

              {headers.map((header, i) => {
                const isSort = i === 2;
                return (
                  <TableHeader
                    key={header.key}
                    {...getHeaderProps({ header, isSortable: isSort })}>
                    {header.header}
                  </TableHeader>
                );
              })}

@tw15egan tw15egan requested a review from a team as a code owner February 24, 2021 17:11
@netlify
Copy link

netlify bot commented Feb 24, 2021

Deploy preview for carbon-elements ready!

Built with commit ea411a5

https://deploy-preview-7888--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Feb 24, 2021

Deploy preview for carbon-components-react ready!

Built with commit ea411a5

https://deploy-preview-7888--carbon-components-react.netlify.app

@netlify
Copy link

netlify bot commented Feb 24, 2021

Deploy preview for carbon-elements ready!

Built with commit d6138f1

https://deploy-preview-7888--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Feb 24, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit d6138f1

https://deploy-preview-7888--carbon-components-react.netlify.app

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to make sure I have the context, this reverts/updates #7726 is that right?

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@kodiakhq kodiakhq bot merged commit c7ea23a into carbon-design-system:master Feb 26, 2021
@dakahn dakahn mentioned this pull request Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants